﻿/*****************************************************************//**
 * @file    FITKViewAdaptorBC.h
 * @brief   Adaptor for BC displacement, rotation and symmetry.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-04-13
 *********************************************************************/

#ifndef __FITKVIEWADAPTORBC_H__
#define __FITKVIEWADAPTORBC_H__

#include "FITKVTKViewAdaptorBase.h"

#include "FITKVTKGraphAdaptorAPI.h"

namespace Exchange
{
    /**
     * @brief   Graph object data adaptor for BC displacement, rotation and symmetry.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-04-13
     */
    class FITKVTKGRAPHADAPTORAPI FITKViewAdaptorBC : public FITKVTKViewAdaptorBase
    {
        // Regist
        FITKCLASS(Exchange, FITKViewAdaptorBC);

    public:
        /**
         * @brief   Constructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-13
         */
        explicit FITKViewAdaptorBC() = default;

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-13
         */
        ~FITKViewAdaptorBC() = default;

        /**
         * @brief   Execute the data exchange.[override]
         * @return  Is OK
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-13
         */
        bool update() override;

    };

    // Type define.
    typedef FITKViewAdaptorBC FITKViewAdaptorBCDisplacement;
    typedef FITKViewAdaptorBC FITKViewAdaptorBCSymmetry;
    
    // Regist displacement/rotation adaptor
    Register2FITKViewAdaptorFactory(Bondary, Interface::FITKAbaBoundaryConditionDisplacement, FITKViewAdaptorBC, 1);

    // Regist symmetry/antisymmetry/encastre adaptor
    Register2FITKViewAdaptorFactory(Bondary, Interface::FITKAbaBoundaryConditionSymmetry, FITKViewAdaptorBC, 2);

    //// Regist velocity/angular velocity adaptor
    Register2FITKViewAdaptorFactory(Bondary, Interface::FITKAbaBoundaryConditionVelocity, FITKViewAdaptorBC, 3);
}   // namespace Exchange

#endif // __FITKVIEWADAPTORBC_H__
